});
}
- let gicon = this._iconForNotificationData(icon);
- let gimage = this._imageForNotificationData(hints);
-
- // If an icon is not specified, we use 'image-data' or 'image-path' hint for an icon
- // and don't show a large image. There are currently many applications that use
- // notify_notification_set_icon_from_pixbuf() from libnotify, which in turn sets
- // the 'image-data' hint. These applications don't typically pass in 'app_icon'
- // argument to Notify() and actually expect the pixbuf to be shown as an icon.
- // So the logic here does the right thing for this case. If both an icon and either
- // one of 'image-data' or 'image-path' are specified, the icon and takes precedence.
- if (!gicon && gimage)
- gicon = gimage;
- else if (!gicon)
+ // 'image-data' (or 'image-path') takes precedence over 'app-icon'.
+ let gicon = this._imageForNotificationData(hints);
+
+ if (!gicon)
+ gicon = this._iconForNotificationData(icon);
+
+ if (!gicon)
gicon = this._fallbackIconForNotificationData(hints);
notification.update(summary, body, { gicon,